<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = "/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>用户详情 基本信息</title>
  <style>
    .user-info {
      width: 100%;
    }

    .user-basic-info {}

    .user-basic-info:after {
      content: '';
      display: block;
      clear: both;
    }

    .user-basic-info>div {
      float: left;
    }

    .user-headImg {
      width: 50px;
      height: 50px;
      border: 1px solid #333;
      margin-top: 20px;
      margin-left: 20px;
    }
.user-headImg img{
	width:100%;
	height:100%;	
}
    .user-name {
      font-size: 18px;
      color: #333;
      margin-left: 20px;
    }

    .user-name p:first-child {
      margin-top: 20px;
      margin-bottom: 1px;
    }

    .user-name p:last-child {
      margin-top: 10px;
      margin-bottom: 10px;
    }

    .user-info-tab {
      text-align: center;
      height: 50px;
      line-height: 50px;
      font-size: 16px;
      border: 1px solid #000;
    }

    .user-info-tab:after {
      content: '';
      display: block;
      clear: both;
    }

    .tab-list {
      width: 33.2%;
      float: left;
      border-right: 1px solid #000;
    }

    .tab-list a {
      width: 100%;
      height: 100%;
      color: #333;
      text-decoration: none;
      display: block;
    }

    .tab-list:last-child {
      border: none;
    }

    .tab-list-active a {
      background-color: #ccc;
      font-weight: bold;
    }

    iframe {
      width: 100%;
      height: 500px;
    }
  </style>
</head>

<body style="background:#fff">
  <div class="user-info">
    <div class="user-basic-info">
      <div class="user-headImg">
        <img src="${user.head_image }" alt="">
      </div>
      <div class="user-name">
       <p class="">昵称：
          <b>${user.petName }</b>
        </p>
        <p class="">注册手机号：${user.phone }&nbsp;&nbsp; 注册时间：${user.creation_date }</p>
      </div>
    </div>
     <div class="user-info-tab">
      <div class="tab-list tab-list-active">
          <a href="<%=basePath%>fruitUser/basic?id=${user.id}" target="content_bottom">基本信息</a>
      </div>
      <div class="tab-list">
        <a href="<%=basePath%>fruitUser/buyInfo?id=${user.id}" target="content_bottom">购买信息</a>
      </div>
      <div class="tab-list">
        <a href="<%=basePath%>fruitUser/inviteInfo?id=${user.id}" target="content_bottom">邀请信息</a>
      </div>
    </div>
    <c:if test="${pd.jump == '01'}">
    	<iframe src="<%=basePath%>fruitUser/basic?id=${user.id}" name="content_bottom"></iframe>
    </c:if>
    <c:if test="${pd.jump == '02'}">
    	<iframe src="<%=basePath%>fruitUser/buyInfo?id=${user.id}" name="content_bottom"></iframe>
    </c:if>
    <c:if test="${pd.jump == '03'}">
    	<iframe src="<%=basePath%>fruitUser/inviteInfo?id=${user.id}" name="content_bottom"></iframe>
    </c:if>
  </div>

  <%@ include file="../../system/index/foot.jsp"%>
	<!-- 删除时确认窗口 -->
	<script src="static/ace/js/bootbox.js"></script>
	<!-- ace scripts -->
	<script src="static/ace/js/ace/ace.js"></script>
	<!-- 日期框 -->
	<script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
	<!-- 下拉框 -->
	<script src="static/ace/js/chosen.jquery.js"></script>
	<!--提示框-->
	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
</body>

  <script type="text/javascript">
  $(top.hangge());
    var tabList = document.querySelectorAll('.tab-list');
    for (var i = 0; i < tabList.length; i++) {
      tabList[i].index = i
      tabList[i].onclick = function () {
        console.log(this.index);
        for (var j = 0; j < tabList.length; j++) {
          tabList[j].className = 'tab-list'
        }
        tabList[this.index].className = 'tab-list tab-list-active'
      }
    }
    
  </script>

</html>
